package r21310.chap05.d1112;

import java.util.Objects;

public class CarBean {
    private String fdjNumber;
    private String cpNumber;

    public String getFdjNumber() {
        return fdjNumber;
    }

    public void setFdjNumber(String fdjNumber) {
        this.fdjNumber = fdjNumber;
    }

    public String getCpNumber() {
        return cpNumber;
    }

    public void setCpNumber(String cpNumber) {
        this.cpNumber = cpNumber;
    }

    public CarBean(String fdjNumber, String cpNumber) {
        this.fdjNumber = fdjNumber;
        this.cpNumber = cpNumber;
    }

    @Override
    public String toString() {
        return this.cpNumber + this.fdjNumber;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CarBean carBean = (CarBean) o;
        return Objects.equals(fdjNumber, carBean.fdjNumber) && Objects.equals(cpNumber, carBean.cpNumber);
    }



}


